package com.ljf.task.dto.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.validation.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 任务明细--新增修改  task_dat_task_detail
 *
 * @author LJF
 * @since 2025-07-23
 */
@Data
@ApiModel("任务明细--新增修改")
public class TaskDatTaskDetailCommand implements Serializable {

    @JsonProperty("id")
    @ApiModelProperty(value = "ID")
    private Long id;

    @JsonProperty("sort")
    @ApiModelProperty(value = "排序")
    @NotNull(message = "排序不能为空", groups = UpdateGroup.class)
    private Integer sort;

    @JsonProperty("title")
    @ApiModelProperty(value = "标题")
    @Length(message = "标题长度不能超过50个字符", max = 50)
    @NotEmpty(message = "标题不能为空", groups = UpdateGroup.class)
    private String title;

    @JsonProperty("content")
    @ApiModelProperty(value = "操作内容")
    @Length(message = "操作内容长度不能超过200个字符", max = 200)
    @NotEmpty(message = "操作内容不能为空", groups = UpdateGroup.class)
    private String content;

}
